<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        let xhr = new XMLHttpRequest()
        let url = "http://apis.juhe.cn/xzpd/query?key=b6653de707753f78ca0ef9c136745cae&men=%E7%99%BD%E7%BE%8A&women=%E9%87%91%E7%89%9B"
        xhr.open('GET',url)

        xhr.onreadystatechange = ()=>{
        if (xhr.status == 200 && xhr.readyState == 4) {
            //处理获取到的数据
            
        }else if (xhr.readyState == 4&& xhr.status != 200) {
        //处理失败的数据
        }
        }
        //发送
        xhr.send()
        


    </script>
    
</body>
</html>